/*
    求最大公约数和最小公倍数
*/
#include<bits/stdc++.h>
using namespace std;
int gcd(int a,int b){
	if(a<b) swap(a,b);
	if(a%b==0) return b;
	else return gcd(b,a%b);
}
int lcm(int a,int b){
	//int gcd(int a,int b);
	return (a*b/gcd(a,b));
}
int main(){
	int n,m;
	cin>>n>>m;
	int large_n,least_n;
	large_n=gcd(n,m);
	least_n=lcm(n,m);
	cout<<"large_n="<<large_n<<","<<"least_n="<<least_n;
	return 0;
} 
